var express = require('express');
var router = express.Router();

const dataCtrl=require('../controllers/news.controller');


router.get('/', function(req, res, next) {
    res.send('news');
});
router.post('/data', dataCtrl.create);
router.get('/data/:id', dataCtrl.getData);//修改获取
router.put('/data/:id', dataCtrl.update);//修改提交
router.delete('/data/:id', dataCtrl.remove);//删除单条
router.post('/data/removes', dataCtrl.removes);//删除多条
router.post('/list', dataCtrl.list);//


module.exports = router;